package com.ruoyi.ctcx.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.ctcx.domain.vo.TbInsuranceSettleStatics;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ctcx.mapper.TbInsuranceSettleCaseMapper;
import com.ruoyi.ctcx.domain.TbInsuranceSettleCase;
import com.ruoyi.ctcx.service.ITbInsuranceSettleCaseService;

/**
 * 保险理赔赔案信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-20
 */
@Service
public class TbInsuranceSettleCaseServiceImpl implements ITbInsuranceSettleCaseService 
{
    @Autowired
    private TbInsuranceSettleCaseMapper tbInsuranceSettleCaseMapper;

    /**
     * 查询保险理赔赔案信息
     * 
     * @param id 保险理赔赔案信息主键
     * @return 保险理赔赔案信息
     */
    @Override
    public TbInsuranceSettleCase selectTbInsuranceSettleCaseById(Long id)
    {
        return tbInsuranceSettleCaseMapper.selectTbInsuranceSettleCaseById(id);
    }

    /**
     * 查询保险理赔赔案信息列表
     * 
     * @param tbInsuranceSettleCase 保险理赔赔案信息
     * @return 保险理赔赔案信息
     */
    @Override
    public List<TbInsuranceSettleCase> selectTbInsuranceSettleCaseList(TbInsuranceSettleCase tbInsuranceSettleCase)
    {
        return tbInsuranceSettleCaseMapper.selectTbInsuranceSettleCaseList(tbInsuranceSettleCase);
    }

    /**
     * 新增保险理赔赔案信息
     * 
     * @param tbInsuranceSettleCase 保险理赔赔案信息
     * @return 结果
     */
    @Override
    public int insertTbInsuranceSettleCase(TbInsuranceSettleCase tbInsuranceSettleCase)
    {
        tbInsuranceSettleCase.setCreateTime(DateUtils.getNowDate());
        return tbInsuranceSettleCaseMapper.insertTbInsuranceSettleCase(tbInsuranceSettleCase);
    }

    /**
     * 修改保险理赔赔案信息
     * 
     * @param tbInsuranceSettleCase 保险理赔赔案信息
     * @return 结果
     */
    @Override
    public int updateTbInsuranceSettleCase(TbInsuranceSettleCase tbInsuranceSettleCase)
    {
        tbInsuranceSettleCase.setUpdateTime(DateUtils.getNowDate());
        return tbInsuranceSettleCaseMapper.updateTbInsuranceSettleCase(tbInsuranceSettleCase);
    }

    /**
     * 批量删除保险理赔赔案信息
     * 
     * @param ids 需要删除的保险理赔赔案信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceSettleCaseByIds(Long[] ids)
    {
        return tbInsuranceSettleCaseMapper.deleteTbInsuranceSettleCaseByIds(ids);
    }

    /**
     * 删除保险理赔赔案信息信息
     * 
     * @param id 保险理赔赔案信息主键
     * @return 结果
     */
    @Override
    public int deleteTbInsuranceSettleCaseById(Long id)
    {
        return tbInsuranceSettleCaseMapper.deleteTbInsuranceSettleCaseById(id);
    }

    @Override
    public TbInsuranceSettleStatics getCaseStaticsBySettleId(String settleId) {
        return tbInsuranceSettleCaseMapper.getCaseStaticsBySettleId(settleId);
    }
}
